//
//  InstitutionResourceModel.swift
//  Venus
//
//  Created by qurongxiang on 2018/8/13.
//  Copyright © 2018年 zhaowang. All rights reserved.
//

import UIKit
import SwiftyJSON

class InstitutionResourceModel: NSObject {
    var id:Int = 0
    var title:String = ""
    var path:String = ""
    var fileType:Int = 0
    var createTime:String = ""
    
    
    static func format(fromJson json: JSON!)->[InstitutionResourceModel] {
        let resourceArray = json["data"].arrayValue
        var temp:[InstitutionResourceModel] = [InstitutionResourceModel]()
        for resourceJson in resourceArray {
            let value = InstitutionResourceModel()
            value.id = resourceJson["id"].intValue
            value.title = resourceJson["title"].stringValue
            value.path = resourceJson["path"].stringValue
            value.fileType = resourceJson["fileType"].intValue
            value.createTime = resourceJson["createTime"].stringValue
            temp.append(value)
        }
        return temp
    }
}
